<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>码溜挪车</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
    <link rel="stylesheet" href="__TMPL__Nuoche/Public/css/removecar.css"/>
    <link rel="stylesheet" href="http://cdn.bootcss.com/weui/1.1.1/style/weui.min.css">
    <link rel="stylesheet" href="http://cdn.bootcss.com/jquery-weui/1.0.1/css/jquery-weui.min.css">
    <style>
        .weui-dialog__title{
            color: red;
        }
    </style>
</head>
<body>
<input type="hidden" id="nid" name="nid" value="{$nid}"/>
<input type="hidden" id="ncode" name="ncode" value="{$ncode}"/>
<input type="hidden" id="plateNum" name="plateNum" value="{$plateNum}"/>
<input type="hidden" id="extension" name="extension" value="{$extension}"/>

<div id="car-container">
    <div id="car-header">
        <div id="del-bond"><a href="{:leuu('Nuoche/Company/unbind')}">解除绑定</a></div>
        <div id="car-num">{$plateNum}</div>
        <div id="tel-num"><span>车主分机号/Extens on number</span></div>
        <div id="num-con">
            <span>{$extension}</span>
        </div>
        <div class="text-des"><span>注：点击一键呼叫按钮后，拨打系统提供的虚拟号码，接通后根据语音提示输入分机号并按#号键完成拨打</span></div>
    </div>
    <div id="container">
        <div id="car-wrap">
            <div id="dot-container1">
                <div class="dot" id="nuoche2"><img src="__TMPL__Nuoche/Public/images/tel.png" alt=""></div>
                <div class="pulse"></div>
                <div class="pulse1"></div>
                <div class="icon-des">
                    <div>一键通话联系</div>
                    <div>车主挪车</div>
                    <div class="icon-des-english">Call contact</div>
                </div>
            </div>
            <div id="dot-container2">
                <div class="dot" id="nuoche"><img src="__TMPL__Nuoche/Public/images/sound.png" alt=""></div>
                <div class="pulse"></div>
                <div class="pulse1"></div>
                <div class="icon-des">
                    <div>一键语音提醒</div>
                    <div>车主挪车</div>
                    <div class="icon-des-english">Voice reminding</div>
                </div>
            </div>
        </div>
    </div>
</div>
<div id="car-footer"><div>本服务由大友印相提供</div><div>客服电话：0377-8386 7777</div></div>
<script type="text/javascript" src="__TMPL__Qrcode/Public/js/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/jquery-weui/1.0.1/js/jquery-weui.min.js"></script>
<script type="text/javascript">
    var secretNo;

    $("#nuoche2").click(function () {

        $.confirm("点击一键呼叫按钮后，拨打系统提供的虚拟号码，接通后输入分机号<span style='color: red;font-weight: 600'>{$extension}</span>并按#号键完成拨打", function() {
            var nid = $('#nid').val();
            var ncode = $('#ncode').val();
            var plateNum = $('#plateNum').val();
            var extension = $('#extension').val();
            var data = {nid: nid, ncode : ncode, plateNum: plateNum,extension: extension};
            $.getJSON("{:leuu('nuoche/company/bindtonghua')}", data, function(response) {
                if(response.msg == 'true'){
                    if(response.secretNo != 'null'){
                        secretNo = response.secretNo;
                    }
                    window.location.href = "tel:"+secretNo;
                }else{
                    alert(response.msg);
                }
            });
        }, function() {
            //点击取消后的回调函数
        });
    });

    $("#nuoche").click(function () {
        $.confirm("是否确定语音通知车主！", function() {
            var nid = $('#nid').val();
            var ncode = $('#ncode').val();
            var plateNum = $('#plateNum').val();
            var data = {nid: nid, ncode : ncode, plateNum: plateNum};
            $.getJSON("{:leuu('nuoche/company/yuyints')}", data, function(response) {
                alert(response.msg);
            });
        }, function() {
            //点击取消后的回调函数
        });


    });
</script>
</body>
</html>